package syncs

import "time"

// Delay 延时执行.
func Delay(d time.Duration, f func()) {
	go func() {
		time.Sleep(d)
		f()
	}()
}

// DelaySecond 延时若干秒执行.
func DelaySecond(num int, f func()) {
	Delay(time.Duration(num)*time.Second, f)
}
